<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
<title></title>
<link rel="stylesheet" type="text/css" href="../../css/aui-flex.css" />
<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
<link rel="stylesheet" type="text/css" href="../../css/common.css" />
<style>
.aui-content{
  padding: 0.4rem 0.7rem;

}
.yunBox{
  border: 1px solid #eee;
}
.comFlexItem{
  min-height: 4.8rem;
}
.copyBtn{
  width: 4.5rem;
  height: 1.7rem;
  line-height: 1.7rem;
  text-align: center;
  background: #e73350;
  font-size: 0.7rem;
  color: #fff;
  border-radius: 5rem;
  position: absolute;
  right: 0.5rem;
}
.inpBox{
  padding-right: 2rem;
}
.kfTou{
  padding: 0 0.75rem;
}
@media(max-width:320px){
  .inpBox{
    padding-right: 2.5rem;
  }
  .copyBtn{
    font-size: 0.6rem;
    position: absolute;
    right: 0.3rem;
  }
  .kfTou{
    padding: 0 0.3rem;
  }
}
input[type="text"]{
  font-size: 0.7rem !important;
  height: 1.7rem !important;
  background: #eee !important;
  padding-left: 0.5rem;
  width: 65%;
}
.qrBox{
  padding: 0rem 1.25rem;
}
.tou{
  height: 2rem;
  width: 2rem;
  border-radius: 50%;
}
.tou img{
  border-radius: 50%;
}
.qr-code{
  width: 5.15rem;
  height: 5.15rem;
  padding: 0.65rem;
  border: 1px solid #eee;
}
.qr-code img{
  width: 4.5rem;
}
.bomBtnBox{
  padding: 2.25rem 0.7rem 0.7rem;
}
</style>
</head>
<body>
  <div class="aui-content">
    <div class="yunBox">
      <div class="comFlexItem aui-border-b">
        <div class="kfTou"><img src="../../image/mine/m_icon5.png" style="height:2.5rem" alt=""></div>
        <div class="flex-auto aui-flex-middle">
          <div class="aui-font-size-12 aui-padded-b-10">联系您的专属运营,请添加微信</div>
          <div class="aui-flex-col">
            <div class="inpBox flex-auto"><input type="text" class="aui-font-size-14" id="wx-num" class="input" value="youmi2018007"></div>
            <div class="copyBtn" tapmode onClick="copyWxNum()">复制微信号</div>
          </div>
        </div>
      </div>
      <div class="aui-flex-col aui-flex-center aui-flex-middle aui-py-15">
        <div><img src="../../image/common/11.png" style="height:0.8rem;" alt=""></div>
        <div class="aui-padded-l-5">专属运营微信二维码</div>
      </div>
      <div class="comFlexItem qrBox">
        <div class="tou aui-margin-l-10"><img src="../../image/common/applogo02.jpg" alt=""></div>
        <div class="flex-auto aui-margin-l-10">
          <div class="aui-font-size-14">有蜜007</div>
          <p class="aui-font-size-12 color-ad">浙江  杭州</p>
        </div>
        <div class="qr-code"><img id="codeImg" src="../../image/mine/ewCode.png" alt=""></div>
      </div>
      <div class="bomBtnBox" tapmode onclick="downloadPhoto()">
        <div class="comBtmBtn radius">保存微信二维码到相册</div>
      </div>
      <div class="aui-font-size-12 aui-text-center color-ad aui-padded-b-15">获取方法：打开微信扫一扫，从相册中获取二维码</div>
    </div>
  </div>
</body>
<script type="text/javascript" src="../../script/import.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript">
apiready = function() {
	api.parseTapmode();
};
function copyWxNum() {
  var clipBoard = api.require('clipBoard');
  var value = $$('#wx-num').val();
  if(value == ''){
    toast('没有微信号')
    return;
  }
  clipBoard.set({
      value:value
  }, function(ret, err) {
      if (ret) {
          toast('微信号复制成功')
      } else {
          alert(JSON.stringify(err));
      }
  });
}
function downloadPhoto(){
				api.saveMediaToAlbum({
					path: 'widget://image/mine/ewCode.png'
				}, function(ret, err) {
					if(ret && ret.status){
						toast('保存成功');
					}else {
						toast('保存失败');
					}
				});
}
</script>
</html>
